/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package inputsms.utilities;

import java.io.IOException;
import java.util.logging.FileHandler;
import java.util.logging.Logger;
import java.util.logging.SimpleFormatter;

/**
 *
 * @author aisyah
 */
public abstract class LoaFileLog {

    public LoaFileLog() {
        
    }

    public static FileHandler getHandlerFile() {
        Logger logger = Logger.getLogger(LoaFileLog.class.getName());
        try {
            //
            // Creating an instance of FileHandler with 5 logging files
            // sequences.
            //
            FileHandler handler = new FileHandler("D:/fb-input/log/log-" + System.currentTimeMillis() + ".log");
            handler.setFormatter(new SimpleFormatter());
            return handler;
        } catch (IOException e) {
//            e.printStackTrace();
            logger.info("Failed to initialize logger handler.");
            return null;
        }
    }
}
